package day0314;

import java.util.Random;
import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {
        //1.乘法公式：
        Random r=new Random();
        int n1=r.nextInt(100);
        int n2=r.nextInt(100);
        System.out.println(n1    +  "*"  +  n2 +  "=");

        //2.输入答案
        Scanner s=new Scanner(System.in);
        int answer=s.nextInt();

        //3.比较answer     和     r.nextInt(100) * r.nextInt(100)
        if(n1*n2 == answer){
            System.out.println("回答正确");
        }else{
            System.out.println("回答错误");
        }
    }
}
